<?php
    require "../../../../run2.php";
?>


CKEDITOR.dialog.add( 's_link', function( editor ) {
	return { 
		title: 'eMail Adresse einfuegen',
 
		minWidth: 300,
		minHeight: 300,
 
 
		contents: [ 
			{
				id: 'tab1',
				label: 'Tab1',
				title: 'Tab1',
				elements : [ 
					{
						id: 'txtMail',
						type: 'text',
						label: 'Adresse eingeben',
						validate : function() {
							// potentielle Validierungen
							/*if (this.getValue() == "") {
								//alert("Das Feld darf nicht leer sein!");
							}
							return this.getValue() != "";*/
						}
					},
                    {
                        id: 'mycolor',
                        type: 'select',
                        label: "Farbe",
                        items: [
                                   [data:snapol_page]'[titel]','<a href=[_url]>[titel]</a>'],[data_end]
                                   ['blau']                                 
                               
                               ],
                        validate : function() {
                            // Validierungen
                            return true;
                        }
                        }
                    
                    
                             
					
				 ]
			}
		 ],
 
 
		 onOk: function() { 
			
//			alert(editor.getSelection().getNative());
			
	//		editor.insertHtml('<a href=\x22www.google.com\x22>'+editor.getSelection().getNative() + '</a>');

			//alert(this.getContentElement('tab1', 'mycolor').getValue());
			
			//var element = CKEDITOR.dom.element.createFromHtml(this.getContentElement('tab1', 'mycolor').getValue());
					//'<a href="' + this.getContentElement('tab1', 'mycolor').getValue() + '">' + 
					//	this.getContentElement('tab1', 'mycolor').getDescription() + 	'</a>');
			//editor.insertElement(element);
		 }
 

	};
 
} );